import axios from 'axios'

export const permissionList = async (type) => {
  return axios.get(`rights/${type}`)
}
export const rolesList = async () => {
  return axios.get(`roles`)
}
// 删除角色权限
export const deleteRolsePre = async (roleId, rightId) => {
  return axios.delete(`roles/${roleId}/rights/${rightId}`)
}
// 获取所有权限列表
export const getAssignList = async (type) => {
  return axios.get(`rights/${type}`)
}
// 更改权限 角色授权
export const authorizationRole = async (roleId, params) => {
  return axios.post(`roles/${roleId}/rights`, { rids: params })
}
